package com.example.infrastructure.persistent.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.*;

/**
 * <p>
 * 抽奖策略规则配置持久化对象
 * </p>
 *
 * @author 三石
 * @since 2024-07-18
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("strategy_rule")
public class StrategyRulePO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 抽奖策略ID
     */
    @TableField("strategy_id")
    private Long strategyId;

    /**
     * 抽奖奖品ID【规则类型为策略，则不需要奖品ID】
     */
    @TableField("award_id")
    private Long awardId;

    /**
     * 抽象规则类型；1-策略规则、2-奖品规则
     */
    @TableField("rule_type")
    private Integer ruleType;

    /**
     * 抽奖规则类型【rule_random - 随机值计算、rule_lock - 抽奖几次后解锁、rule_luck_award - 幸运奖(兜底奖品)】
     */
    @TableField("rule_model")
    private String ruleModel;

    /**
     * 抽奖规则比值
     */
    @TableField("rule_value")
    private String ruleValue;

    /**
     * 抽奖规则描述
     */
    @TableField("rule_desc")
    private String ruleDesc;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;


}
